package com.cacheme;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class DefaultCacheContext implements CacheContext {

	/**
	 * key: type name
	 * 
	 * value: a map for this type.
	 */
	private Map cacheMap;
	
	public DefaultCacheContext() {
		super();
		cacheMap = Collections.synchronizedMap(new HashMap());
	}

	@Override
	public void clearCache() {
		cacheMap.clear();
	}

	@Override
	public boolean isCacheEmpty() {
		return cacheMap.isEmpty();
	}

	@Override
	public <T> T getObject(Class<T> clazz, Object key) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public <T> void removeType(Class<T> clazz) {
		// TODO Auto-generated method stub

	}

}
